local R = owner.Character:FindFirstChildWhichIsA("Humanoid").RootPart.Position local M = Instance.new("Model",script) M.Name = "Box"..owner.Name function Create(Pos,Size) local P = Instance.new("Part",M) P.Locked = true P.Material = Enum.Material.WoodPlanks P.Name = "BoxPart" P.BrickColor = BrickColor.new("Brown") P.Position = Pos P.Size = Size return(P) end local P1 = Create(R+Vector3.new(0,-2.4,0),Vector3.new(6,1,6)) local P2 = Create(R+Vector3.new(2.5,0.1,0),Vector3.new(1,4,6)) local P3 = Create(R+Vector3.new(-2.5,0.1,0),Vector3.new(1,4,6)) local P4 = Create(R+Vector3.new(0,0.1,2.5),Vector3.new(4,4,1)) local P5 = Create(R+Vector3.new(0,0.1,-2.5),Vector3.new(4,4,1)) Instance.new("BodyGyro",P1).MaxTorque = Vector3.new(400,0,400) M:MakeJoints() local SoundD = Instance.new("Sound",P1) SoundD.SoundId = "rbxasset://sounds/electronicpingshort.wav" SoundD.Looped = true local SoundX = Instance.new("Sound",P1) SoundX.SoundId = "rbxasset://sounds/snap.mp3" SoundX.Looped = true local Stopped = true local Stopped2 = true local Touching = false local LandTimer = 0 local SpinTimer = 0 local Shift = 0 local Up = true local function Play(sound,pitch,vol) sound.TimePosition = 0.2 sound.PlaybackSpeed = pitch sound.Volume = vol sound:Play() end P1.Touched:Connect(function(hit) if (not hit:IsA("Terrain") or table.find(P1:GetTouchingParts(),hit)) and hit.CanCollide then Touching = true end end) spawn(function() while P1.Parent do local Collide = false if Touching then Collide = true else local T = P1:GetTouchingParts() for i = 1,#T do if T[i].CanCollide then Collide = true end end end Touching = false local Thud = false if Collide then if LandTimer <= 0 then Thud = true Stopped = false Play(SoundX,0.6,1) wait(0.05) end LandTimer = 3 else LandTimer = LandTimer - 1 end if not Thud and LandTimer > 0 and P1.Velocity.Magnitude >= 4 then Stopped = false Play(SoundX,0.4+(P1.Velocity*Vector3.new(1,0,1)).Magnitude/200,math.min((P1.Velocity*Vector3.new(1,0,1)).Magnitude/400,1)) elseif not Stopped then Stopped = true SoundX:Stop() end if Up then Shift = Shift + 1 if Shift >= 1 then Up = false end else Shift = Shift - 1 if Shift <= -1 then Up = true end end SpinTimer = SpinTimer - 1 if LandTimer > 0 and math.abs(P1.RotVelocity.Y) >= 10 then Stopped2 = false local Pit = 2.15+Shift*0.05 if math.abs(P1.RotVelocity.Y) >= 40 then SpinTimer = 30 end if SpinTimer > 0 then Pit = 1.66+Shift*0.05 end Play(SoundD,Pit,math.min((math.abs(P1.RotVelocity.Y)-10)/10,1.5)) elseif not Stopped2 then Stopped2 = true SoundD:Stop() end wait(0.05) end end)